﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace RedisDemo.Models
{
    public class OrderDto
    {
        public long Id { get; set; }
        public DateTime CreationTime { get; set; }
        public long? CreatorUserId { get; set; }

        //////////////////////////订单类型///////////////////////////
        /// <summary>
        /// 订单类型（资源服务器收费资源类型，检查、文章、视频）
        /// </summary>
        public OrderType OrderType { get; set; }
        /// <summary>
        /// 商品ID（资源服务器收费资源Id，检查、文章、视频）
        /// </summary>
        public string ProductId { get; set; }
        /// <summary>
        /// 商品描述（资源服务器收费资源Id，检查、文章、视频）(128)
        /// </summary>
        public string OrderBody { get; set; }


        ////////////////////////支付///////////////////////////
        /// <summary>
        /// 订单号码
        /// </summary>
        public string OrderNumber { get; set; }
        /// <summary>
        /// 订单金额
        /// </summary>
        public int PayMoney { get; set; }
        /// <summary>
        /// 支付途径
        /// </summary>
        public PayType TradeType { get; set; }
        /// <summary>
        /// 订单状态
        /// </summary>
        public OrderStatus Status { get; set; }
    }

    /// <summary>
    /// 订单类型
    /// </summary>
    public enum OrderType
    {
        /// <summary>
        /// 自主检查
        /// </summary>
        SelfCheck = 0,
        /// <summary>
        /// 知识付费
        /// </summary>
        Lesson = 1,
        /// <summary>
        /// 在线咨询医生
        /// </summary>
        OnlineVisits = 2,
        /// <summary>
        /// 开单检查
        /// </summary>
        BillCheck = 3,
        /// <summary>
        /// 治疗评估
        /// </summary>
        Treatment = 4,


    }

    public enum PayType
    {
        /// <summary>
        /// 微信支付
        /// </summary>
        TenPay = 0,
        /// <summary>
        /// 支付宝支付
        /// </summary>
        AliPay = 1,
        /// <summary>
        /// 银联支付
        /// </summary>
        UnionPay = 2,
        /// <summary>
        /// 无需支付
        /// </summary>
        NoNeedPay = 3
    }

    public enum OrderStatus
    {
        /// <summary>
        /// 未支付
        /// </summary>
        NotPay = 0,
        /// <summary>
        /// 支付失败
        /// </summary>
        PayFailed = 1,
        /// <summary>
        /// 执行退款
        /// </summary>
        Refund = 2,
        /// <summary>
        /// 执行关单
        /// </summary>
        CloseOrder = 3,
        /// <summary>
        /// 已退款
        /// </summary>
        RefundSucceed = 4,
        /// <summary>
        /// 已关单
        /// </summary>
        CloseSucceed = 5,
        /// <summary>
        /// 已支付
        /// </summary>
        PaySucceed = 6,
        /// <summary>
        /// 后台处理
        /// </summary>
        JobTimeOut = 7,
    }

}
